let p = new Promise((resolve,reject)=>{
  setTimeout(() => {
    resolve('first')
    // reject('happen error')
  }, 2000);
})
p.then(res=>{
  console.log(res);
  // return Promise.resolve('second')
  return Promise.reject('happen error')
}).then(res=>{
  console.log(res);
  return Promise.resolve('third')
}).then(res=>{
  console.log(res);
}).catch(err=>{
  console.log(err);
})

    // reject('happen error')

  // return Promise.reject('happen error')
